<template>
  <div id="app">
    <Header v-if="headerShow"></Header>
    <router-view/>
    <Footer v-if="footerShow"></Footer>
  </div>
</template>
<script>
import Header from '@/components/Header.vue'
import Footer from "@/components/Footer.vue";

export default {
  name: 'Home',
  components: {
    Header,
    Footer
  },
  created() {
    if (localStorage.getItem("TOKEN")) {
      // 发送用户请求
      this.$store.dispatch("getUserInfo")
    }
  },
  computed: {
    headerShow() {
      return this.$route.meta.headerShow;
    },
    footerShow() {
      return this.$route.meta.footerShow;
    },
    iSkeepAlive() {
      return this.$route.meta.iSkeepAlive;
    }
  },
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 8px;
  /*高宽分别对应横竖滚动条的尺寸*/
  height: 8px;
}

::-webkit-scrollbar-thumb {
  /*滚动条里面小方块*/
  border-radius: 5px;
  /* // box-shadow: inset 0 0 5px rgba(73, 177, 245); */
  background: rgb(138, 182, 96);
}

::-webkit-scrollbar-track {
  /*滚动条里面轨道*/
  /* // box-shadow: inset 0 0 5px rgba(73, 177, 245); */
  border-radius: 5px;
}
</style>
